package com.zygame.sdk.bean;

import java.util.ArrayList;

import android.os.Parcel;
import android.os.Parcelable;

public class Navibutton extends ConfigData implements Parcelable{
	public Navibutton(){
		super();
	}
	public Navibutton(String id,String pid,String name,String action,String src,String type,String auth,
			String url,String pos,String toolbar,String hide,String seq,String status,ArrayList<Submenu> submenus,ArrayList<Navibutton> navibuttons){
		super(id, pid, name, action, src, type, auth, url, pos, toolbar,hide,seq,status, submenus, navibuttons);
	}
	
	
	
	@Override
	public int describeContents() {
		return 0;
	}
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		//		读和写的顺序要一致
		dest.writeString(id);
		dest.writeString(pid);
		dest.writeString(name);
		dest.writeString(action);
		dest.writeString(src);
		dest.writeString(type);
		dest.writeString(auth);
		dest.writeString(url);
		dest.writeString(pos);
		dest.writeString(toolbar);
		dest.writeString(seq);
		dest.writeString(status);
	}
	
	public Navibutton(Parcel parcel){
		//		读和写的顺序要一致
		id = parcel.readString();
		pid = parcel.readString();
		name = parcel.readString();
		action = parcel.readString();
		src = parcel.readString();
		type = parcel.readString();
		auth = parcel.readString();
		url = parcel.readString();
		pos = parcel.readString();
		toolbar = parcel.readString();
		seq = parcel.readString();
		status = parcel.readString();
	}
	
	public final static Parcelable.Creator<Navibutton> CREATOR = new Creator<Navibutton>() {

		@Override
		public Navibutton createFromParcel(Parcel source) {
			return new Navibutton(source);
		}

		@Override
		public Navibutton[] newArray(int size) {
			return new Navibutton[size];
		}
	};

	@Override
	public String toString() {
		return "Navibutton [id=" + id + ", pid=" + pid + ", name=" + name
				+ ", action=" + action + ", src=" + src + ", type=" + type
				+ ", auth=" + auth + ", url=" + url + ", pos=" + pos
				+ ", toolbar=" + toolbar + ", submenus=" + submenus
				+ ", navibuttons=" + navibuttons + "]";
	}
	
	
	
}
